package com.common.entity;

import java.io.Serializable;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 实体基础类
 * 
 * @author duanhx
 * @version [版本号, 2012-7-11]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	public String toString() {
		
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	public boolean equals(Object o) {

		return EqualsBuilder.reflectionEquals(this, o);
	}

	public int hashCode(Object o) {

		return HashCodeBuilder.reflectionHashCode(this);
	}
}